package com.zmn.mcc.business.interfaces.permit;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.mcc.common.dto.permit.PermitDRO;
import com.zmn.mcc.common.dto.permit.PermitLitDO;
import com.zmn.mcc.common.dto.permit.PermitTreeDRO;
import com.zmn.mcc.model.entity.permit.McPermit;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 21:57
 */
public interface PermitBService {

    /**
     * 根据角色查询简化权限对象列表
     *
     * @param roleIds 角色ID集
     * @param sysId   系统ID
     * @return
     */
    List<PermitLitDO> listPermitLitByRoleIds(List<Integer> roleIds, Integer sysId);

    /**
     * 描述: 根据员工ID查询员工组织结构权限
     *
     * @param staffId staffId
     * @return java.util.List < com.zmn.mcc.common.dto.cc.CCStaffDpermitDRO>
     * @author jiafei
     * @since 2022/5/24 11:14
     */
    List<PermitDRO> listOrgPermitByStaffId(Integer staffId);


    /**
     * 描述: 根据员工ID查询员工部门权限
     *
     * @param staffId staffId
     * @return java.util.List<com.zmn.mcc.common.dto.permit.PermitTreeDRO>
     * @author jiafei
     * @since 2022/6/6 13:09
     */
    List<PermitTreeDRO> listProductPermitByStaffId(Integer staffId);

    /**
     * 新增权限
     *
     * @param permit
     * @return
     */
    ResponseDTO addPermit(McPermit permit);

    /**
     * 修改权限
     *
     * @param permit
     * @return
     */
    ResponseDTO modifyPermit(McPermit permit);

    /**
     * 描述: 校验用户权限
     *
     * @param staffId staffId
     * @param app     app
     * @param urls    urls
     * @return java.util.List<java.lang.String>
     * @author jiafei
     * @since 2022/8/4 14:16
     */
    List<String> checkPermitUrls(Integer staffId, String app, List<String> urls);
}
